package coreentity

import (
	"core/coreinfo"
	"core/corestruct"
	"core/coreutil"
	"reflect"
)

type HtParam struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Name string `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:参数名称;"`

	Lx  string `json:"lx"           validate:"required,max=50"gorm:"column:lx;size:50;DEFAULT:'';not null;comment:参数类型;"`
	Val string `json:"val"          validate:"required,max=200"gorm:"column:val;size:200;DEFAULT:'';not null;comment:参数值;"`

	CrtDt   corestruct.MyTime    `json:"crtDt"                            gorm:"column:crt_dt;not null;comment:创建日期;"`
	CrtUid  int64                `json:"crtUid,string"                    gorm:"column:crt_uid;DEFAULT:0;not null;comment:创建人编号;"`
	CrtDid  int64                `json:"crtDid,string"                    gorm:"column:crt_did;DEFAULT:0;not null;comment:机构编号;"`
	EdtDt   corestruct.MyTime    `json:"edtDt"                            gorm:"column:edt_dt;not null;comment:修改日期;"`
	EdtUid  int64                `json:"edtUid,string"                    gorm:"column:edt_uid;DEFAULT:0;not null;comment:修改人编号;"`
	Gid     string               `json:"gid"                              gorm:"column:gid;DEFAULT:'';type:char(36);not null;comment:Gid;"`
	Deleted corestruct.DeletedAt `json:"deleted"                          gorm:"column:deleted;DEFAULT:0;type:tinyint(1);not null;comment:删除标志;"`
}

func (p *HtParam) TableName() string {
	return "HtParam"
}
func HtParamInit() {
	var mcls = &HtParam{}
	var m = &corestruct.MyClass{
		Name:     "参数表",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  coreinfo.PRJ_NAME,
		Type:     reflect.TypeOf(mcls),
	}
	coreutil.StructUtil.AddEntity(m)
}
